/**
 * Created by Adi(adi@imeth.cn) on 2018/8/29.
 */
import { queryList, getById, update, save } from '../services/bank';
import { Request } from '../common/Request';

const modelRequest = new Request([
  {
    type: 'bankList',
    requestWay: queryList,
  },
  {
    type: 'getById',
    requestWay: getById,
  },
  {
    type: 'save',
    requestWay: save,
  },
  {
    type: 'update',
    requestWay: update,
  },
]);

export default {
  namespace: 'BankChannel',

  state: {
    bankList: [],
    bankDetail: {},
    saveStatus: {},
    updateStatus: {},
  },

  effects: modelRequest.effects,

  reducers: modelRequest.reducer,

};
